Skip to content

Conversation

@Flamki
Copy link
Contributor

@Flamki Flamki commented Feb 11, 2026

Closes #167

Summary

  • Add a new admin-protected backend route system.version exposing:
    • version
    • commit
    • buildDate
  • Display this metadata in Settings > Project under a new Application card (admin only).
  • Wire Docker/build metadata into runtime env:
    • APP_VERSION
    • APP_COMMIT
    • APP_BUILD_DATE
  • Align FastAPI env usage to FASTAPI_PORT across backend/CLI/docs/compose/workflow.

Why

As requested in #167, admins need to identify exactly which app build is running, including commit SHA in Docker deployments.

Testing

  • Live smoke test passed:
    1. Started backend with:
      • APP_VERSION=1.2.3
      • APP_COMMIT=abc1234
      • APP_BUILD_DATE=2026-02-11T00:00:00Z
    2. Signed up an admin user via /api/auth/sign-up/email
    3. Confirmed project/admin context via /api/trpc/project.getCurrent
    4. Queried /api/trpc/system.version with auth cookie and got:
      {"version":"1.2.3","commit":"abc1234","buildDate":"2026-02-11T00:00:00Z"}

Notes

  • Full repo lint/typecheck has existing unrelated failures; this change was validated with runtime smoke testing on the affected path.

@Flamki Flamki force-pushed the feat/settings-version-number branch from ef839b2 to f4bd802 Compare February 11, 2026 20:02
@Flamki
Copy link
Contributor Author

Flamki commented Feb 11, 2026

Key points:

  • Addresses Add version number in the settings pages #167: Admins can now see version, commit SHA, and build date in Settings > Project
  • Backend endpoint: system.version (admin-protected tRPC route)
  • Tested via live smoke test with explicit build metadata
  • All CI checks passing: ESLint, Prettier, CLI lint

Happy to address any feedback!

Copy link
Contributor

@Bl3f Bl3f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just before we merge can you rebase on origin/main and also remove the FASTAPI_URL/PORT changes, they have been done on main already!

Thank for this

@Flamki Flamki force-pushed the feat/settings-version-number branch from bb2bae2 to a839c40 Compare February 12, 2026 11:54
Copy link
Contributor

@Bl3f Bl3f left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few last changes.

</SettingsCard>

{isAdmin && (
<SettingsCard title='Application'>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of using inputs can you make the design flatter? I know we use input for project parameters, but it's because we might make them editable, where here it does not makes sense to edit.

-e BETTER_AUTH_URL=http://localhost:5005 \
-v /path/to/your/nao-project:/app/project \
-e NAO_DEFAULT_PROJECT_PATH=/app/project \
getnao/nao:latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure about this?

@@ -0,0 +1,54 @@
import fs from 'fs';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a few eslint warnings.

const db = drizzle(process.env.DB_URI || '', { schema: pgSchema });

describe('userTable', () => {
(process.env.DB_URI ? describe : describe.skip)('userTable', () => {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure why u need to change this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add version number in the settings pages

2 participants